//certFactor(课程等级，用户年限，证书代码)

function certFactor(level, user_years, certCode) {
    console.log(certCode)
    let must_years = certCode.substr(level + 2, 1)
    if(must_years == 'n'){
        return false
    }
    must_years = isNaN(Number(must_years)) ? 10 + ['A', 'B', 'C', 'D', 'E', 'F'].indexOf(must_years) : must_years
    return Number(user_years) >= Number(must_years)
}

export default certFactor
